package hcn.protocol.registration.xml.resp;

import hcn.protocol.registration.MsgHeader;

import javax.xml.bind.annotation.*;
import java.util.List;

/**
 * @program: Myproject
 * @description: 病人信息查询
 * @author: zangsf
 * @create: 2022-06-09 16:53
 **/
@XmlRootElement(name = "BSXml")
public class QueryPatientListResponse {
    private hcn.protocol.registration.MsgHeader msgHeader;
    private MsgBody msgBody;

    @XmlElement(name = "MsgHeader")
    public MsgHeader getMsgHeader() {
        return msgHeader;
    }

    public void setMsgHeader(MsgHeader msgHeader) {
        this.msgHeader = msgHeader;
    }

    @XmlElement(name = "MsgBody")
    public MsgBody getMsgBody() {
        return msgBody;
    }

    public void setMsgBody(MsgBody msgBody) {
        this.msgBody = msgBody;
    }

    public static class MsgBody {
        private String status;
        private String code;
        private String detail;
        private Data data;

        @XmlElement(name = "Status")
        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        @XmlElement(name = "Code")
        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        @XmlElement(name = "Detail")
        public String getDetail() {
            return detail;
        }

        public void setDetail(String detail) {
            this.detail = detail;
        }

        @XmlElement(name = "Data")
        public Data getData() {
            return data;
        }

        public void setData(Data data) {
            this.data = data;
        }

        public static class Data {
            /**
             * 总数
             */
            private String total;
            private List<PatientList> patientLists;

            @XmlElement(name = "Total")
            public String getTotal() {
                return total;
            }

            public void setTotal(String total) {
                this.total = total;
            }

            @XmlElementWrapper(name = "PatientLists")
            @XmlElement(name = "PatientList")
            public List<PatientList> getPatientLists() {
                return patientLists;
            }

            public void setPatientLists(List<PatientList> patientLists) {
                this.patientLists = patientLists;
            }

        }

        @XmlRootElement(name = "PatientList")
        public static class PatientList {
            /**
             * 区域内患者唯一标识
             */
            private String MPI;
            /**
             * 业务系统患者档案ID
             * 业务系统内部患者档案的唯一编号，考虑各业务系统通用，门诊档案填门诊号码，住院档案填住院号
             */
            private String sourcePatientId;
            /**
             * 业务系统患者档案类型
             * 标识病人在业务系统内的档案类型。枚举值：OV:门诊档案 IV:住院档案 HV:体检档案 LG:留观档案 TV:其他档案
             */
            private String sourcePatientIdType;
            /**
             * 建档机构代码
             * 经《医疗机构执业许可证》登记的，并按照特定编码体系填写的代码WS_218
             */
            private String authorOrganization;
            /**
             * 建档机构名称
             */
            private String authorOrganizationName;
            private String idCardCode;
            private String idCard;
            /**
             * 医疗保险类别代码
             * 患者本人参加的医疗保险的类别在特定编码体系中的代 码CV02_01_204
             */
            private String medicalInsuranceCategoryCode;
            private List<MedicalCardInfo> medicalCardInfos;
            /**
             * 建卡（更新）日期时间
             */
            private String effectiveTime;
            /**
             * 患者姓名
             */
            private String name;
            /**
             * 性别代码
             */
            private String sex;
            /**
             * 出生日期
             */
            private String birthDate;
            /**
             * 婚姻状况代码
             * 表示患者当前婚姻状况的代码GB_T2261_2
             */
            private String maritalStatus;
            /**
             * 民族
             * 表示患者所属民族类别在特定编码体系中的代码GB_T3304
             */
            private String ethnicGroup;
            /**
             * 职业类别代码
             * 标识患者当前的从业状况的代码GB_T2261_4
             */
            private String occupationCategoryCode;
            /**
             * 患者电话号码
             * 患者联系电话的号码，包括国际、国内区号和分机号
             */
            private String patientPhone;
            /**
             * 工作单位名称
             * 本人或联系人当前工作单位的组织机构名称
             */
            private String workUnit;
            /**
             * 工作单位电话号码
             * 指患者当前工作单位的联系电话号码，包括国际、国内区号和分机号
             */
            private String workAddrPhone;
            /**
             * 建卡者代码
             * 医疗机构职工在特定编码体系中的编码CU_Personnel
             */
            private String authorId;
            /**
             * 建卡者姓名
             * 首次为患者建立电子病历者在公安户籍管理部门正式登记注册的姓氏和名称
             */
            private String author;
            /**
             * 地址
             */
            private Address address;
            /**
             * 联系方式
             */
            private Contact contact;

            @XmlElement(name = "MPI")
            public String getMPI() {
                return MPI;
            }

            public void setMPI(String MPI) {
                this.MPI = MPI;
            }

            @XmlElement(name = "SourcePatientId")
            public String getSourcePatientId() {
                return sourcePatientId;
            }

            public void setSourcePatientId(String sourcePatientId) {
                this.sourcePatientId = sourcePatientId;
            }

            @XmlElement(name = "SourcePatientIdType")
            public String getSourcePatientIdType() {
                return sourcePatientIdType;
            }

            public void setSourcePatientIdType(String sourcePatientIdType) {
                this.sourcePatientIdType = sourcePatientIdType;
            }

            @XmlElement(name = "AuthorOrganization")
            public String getAuthorOrganization() {
                return authorOrganization;
            }

            public void setAuthorOrganization(String authorOrganization) {
                this.authorOrganization = authorOrganization;
            }

            @XmlElement(name = "AuthorOrganizationName")
            public String getAuthorOrganizationName() {
                return authorOrganizationName;
            }

            public void setAuthorOrganizationName(String authorOrganizationName) {
                this.authorOrganizationName = authorOrganizationName;
            }

            @XmlElement(name = "IdCardCode")
            public String getIdCardCode() {
                return idCardCode;
            }

            public void setIdCardCode(String idCardCode) {
                this.idCardCode = idCardCode;
            }

            @XmlElement(name = "IdCard")
            public String getIdCard() {
                return idCard;
            }

            public void setIdCard(String idCard) {
                this.idCard = idCard;
            }

            @XmlElement(name = "MedicalInsuranceCategoryCode")
            public String getMedicalInsuranceCategoryCode() {
                return medicalInsuranceCategoryCode;
            }

            public void setMedicalInsuranceCategoryCode(String medicalInsuranceCategoryCode) {
                this.medicalInsuranceCategoryCode = medicalInsuranceCategoryCode;
            }

            @XmlElementWrapper(name = "MedicalCardInfos")
            @XmlElement(name = "MedicalCardInfo")
            public List<MedicalCardInfo> getMedicalCardInfos() {
                return medicalCardInfos;
            }

            public void setMedicalCardInfos(List<MedicalCardInfo> medicalCardInfos) {
                this.medicalCardInfos = medicalCardInfos;
            }

            @XmlElement(name = "EffectiveTime")
            public String getEffectiveTime() {
                return effectiveTime;
            }

            public void setEffectiveTime(String effectiveTime) {
                this.effectiveTime = effectiveTime;
            }

            @XmlElement(name = "Name")
            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            @XmlElement(name = "SexDisplayName")
            public String getSex() {
                return sex;
            }

            public void setSex(String sex) {
                this.sex = sex;
            }

            @XmlElement(name = "BirthDate")
            public String getBirthDate() {
                return birthDate;
            }

            public void setBirthDate(String birthDate) {
                this.birthDate = birthDate;
            }

            @XmlElement(name = "MaritalStatus")
            public String getMaritalStatus() {
                return maritalStatus;
            }

            public void setMaritalStatus(String maritalStatus) {
                this.maritalStatus = maritalStatus;
            }

            @XmlElement(name = "EthnicGroup")
            public String getEthnicGroup() {
                return ethnicGroup;
            }

            public void setEthnicGroup(String ethnicGroup) {
                this.ethnicGroup = ethnicGroup;
            }

            @XmlElement(name = "OccupationCategoryCode")
            public String getOccupationCategoryCode() {
                return occupationCategoryCode;
            }

            public void setOccupationCategoryCode(String occupationCategoryCode) {
                this.occupationCategoryCode = occupationCategoryCode;
            }

            @XmlElement(name = "PatientPhone")
            public String getPatientPhone() {
                return patientPhone;
            }

            public void setPatientPhone(String patientPhone) {
                this.patientPhone = patientPhone;
            }

            @XmlElement(name = "WorkUnit")
            public String getWorkUnit() {
                return workUnit;
            }

            public void setWorkUnit(String workUnit) {
                this.workUnit = workUnit;
            }

            @XmlElement(name = "WorkAddrPhone")
            public String getWorkAddrPhone() {
                return workAddrPhone;
            }

            public void setWorkAddrPhone(String workAddrPhone) {
                this.workAddrPhone = workAddrPhone;
            }

            @XmlElement(name = "AuthorId")
            public String getAuthorId() {
                return authorId;
            }

            public void setAuthorId(String authorId) {
                this.authorId = authorId;
            }

            @XmlElement(name = "Author")
            public String getAuthor() {
                return author;
            }

            public void setAuthor(String author) {
                this.author = author;
            }

            @XmlElement(name = "Address")
            public Address getAddress() {
                return address;
            }

            public void setAddress(Address address) {
                this.address = address;
            }

            @XmlElement(name = "Contact")
            public Contact getContact() {
                return contact;
            }

            public void setContact(Contact contact) {
                this.contact = contact;
            }



        }
    }

    @XmlRootElement(name = "MedicalCardInfo")
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class MedicalCardInfo {
        /**
         * 就诊卡类别代码
         */
        private String MedicalCardType;
        /**
         * 就诊卡号
         */
        private String MedicalCardId;
        /**
         * 就诊卡的状态
         * 就诊卡的状态，其中active-激活；作废-disable；退卡-retired
         */
        private String MedicalCardStatus;

        public String getMedicalCardType() {
            return MedicalCardType;
        }

        public void setMedicalCardType(String medicalCardType) {
            MedicalCardType = medicalCardType;
        }

        public String getMedicalCardId() {
            return MedicalCardId;
        }

        public void setMedicalCardId(String medicalCardId) {
            MedicalCardId = medicalCardId;
        }

        public String getMedicalCardStatus() {
            return MedicalCardStatus;
        }

        public void setMedicalCardStatus(String medicalCardStatus) {
            MedicalCardStatus = medicalCardStatus;
        }
    }


    public static  class Address{
        /**
         *地址全称（非结构化）
         */
        private String  addressDetail;
        /**
         * 地址-省（自治区、直辖市）
         * 患者本人或联系人地址中的省、自治区或直辖市名称GB_T2260
         */
        private String  province;
        /**
         * 患者本人或联系人地址中的市、地区或州的名称GB_T2260
         */
        private String  city;
        /**
         * 患者本人或联系人地址中的县（区）的名称GB_T2260
         */
        private String  county;
        /**
         * 患者本人或联系人地址中的乡、镇或城市的街道办事处名称
         */
        private String  town;
        /**
         * 患者本人或联系人地址中的村或城市的街、路、里、弄等名称
         */
        private String  village;
        /**
         * 患者本人或联系人地址中的门牌号码
         */
        private String  houseNumber;
        /**
         * 由阿拉伯数字组成，用来表示与地址对应的邮局及其投递区域的邮政通信代号
         */
        private String  postalCode;

        @XmlElement(name = "AddressDetail")
        public String getAddressDetail() {
            return addressDetail;
        }

        public void setAddressDetail(String addressDetail) {
            this.addressDetail = addressDetail;
        }

        @XmlElement(name = "Province")
        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        @XmlElement(name = "City")
        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        @XmlElement(name = "County")
        public String getCounty() {
            return county;
        }

        public void setCounty(String county) {
            this.county = county;
        }

        @XmlElement(name = "Town")
        public String getTown() {
            return town;
        }

        public void setTown(String town) {
            this.town = town;
        }

        @XmlElement(name = "Village")
        public String getVillage() {
            return village;
        }

        public void setVillage(String village) {
            this.village = village;
        }

        @XmlElement(name = "HouseNumber")
        public String getHouseNumber() {
            return houseNumber;
        }

        public void setHouseNumber(String houseNumber) {
            this.houseNumber = houseNumber;
        }

        @XmlElement(name = "PostalCode")
        public String getPostalCode() {
            return postalCode;
        }

        public void setPostalCode(String postalCode) {
            this.postalCode = postalCode;
        }
    }

    public static  class Contact{
        /**
         * 指联系人与患者之间的关系代码GB_T4761
         */
        private String relationShipWithPatient;
        /**
         * 联系人在公安户籍管理部门正式登记注册的姓氏和名称
         */
        private String contactPerson;
        /**
         * 指联系人的联系电话号码，包括国际、国内区号和分机号
         */
        private String contactPersonTel;
        /**
         * 监护人电话号码
         */
        private String guardianMobile;
        /**
         * 监护人身份证件号码
         */
        private String guardianIdCardId;
        /**
         * 监护人身份证件类别代码
         */
        private String guardianIdCardType;
        /**
         * 监护人姓名
         */
        private String guardianName;

        @XmlElement(name = "RelationShipWithPatient")
        public String getRelationShipWithPatient() {
            return relationShipWithPatient;
        }

        public void setRelationShipWithPatient(String relationShipWithPatient) {
            this.relationShipWithPatient = relationShipWithPatient;
        }

        @XmlElement(name = "ContactPerson")
        public String getContactPerson() {
            return contactPerson;
        }

        public void setContactPerson(String contactPerson) {
            this.contactPerson = contactPerson;
        }

        @XmlElement(name = "ContactPersonTel")
        public String getContactPersonTel() {
            return contactPersonTel;
        }

        public void setContactPersonTel(String contactPersonTel) {
            this.contactPersonTel = contactPersonTel;
        }

        @XmlElement(name = "GuardianMobile")
        public String getGuardianMobile() {
            return guardianMobile;
        }

        public void setGuardianMobile(String guardianMobile) {
            this.guardianMobile = guardianMobile;
        }

        @XmlElement(name = "GuardianIdCardId")
        public String getGuardianIdCardId() {
            return guardianIdCardId;
        }

        public void setGuardianIdCardId(String guardianIdCardId) {
            this.guardianIdCardId = guardianIdCardId;
        }

        @XmlElement(name = "GuardianIdCardType")
        public String getGuardianIdCardType() {
            return guardianIdCardType;
        }

        public void setGuardianIdCardType(String guardianIdCardType) {
            this.guardianIdCardType = guardianIdCardType;
        }

        @XmlElement(name = "GuardianName")
        public String getGuardianName() {
            return guardianName;
        }

        public void setGuardianName(String guardianName) {
            this.guardianName = guardianName;
        }
    }
}
